package com.pwc.conversionTool.task;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import com.pwc.conversionTool.IO.Reader;

public class TaskManage {

	private static TaskManage taskManage=null;
	
	private static List<Task> tasks=null;
	
	public static TaskManage getInstance()
	{
		if(taskManage==null)
		{
			taskManage=new TaskManage();
			tasks=new ArrayList<Task>();
		}
		
		return taskManage;
	}

	
	
	private TaskManage()
	{}
	
	
	public static List<Task> getTasks() {
		return tasks;
	}
	
	/**
	 * 
	 * @param folderPath
	 * @param operation
	 * @param relationPath
	 * @param TaskName
	 */
	public void stratTask(String folderPath,String operation,String relationPath,String TaskName ){
		List<File>files= Reader.getAllFileFromStringPath(folderPath);
		startTask(files,  operation, relationPath, TaskName);
		}
	
	
	
	/**
	 * to start a task from this function and add it to 
	 * @param files
	 * @param operation
	 * @param relationPath
	 * @param TaskName
	 */
	public void startTask(List<File> files,String operation,String relationPath,String TaskName){
		Task task=new Task();
		//some setting 
		
		tasks.add(task);
		
		task.run();
	}
	
	public void stopTask(){
		
	}


	
	
	
	
	
	
	
}
